import ws from "nodejs-websocket";
import fs from "fs";
const options = {
  //   secure: true,
  //   key: fs.readFileSync(process.cwd() + "/xiaoyueyue.com.cn.key"),
  //   cert: fs.readFileSync(process.cwd() + "/xiaoyueyue.com.cn.crt"),
};
ws.createServer(options, function (conn) {
  console.log("连接成功");
  conn.on("close", function (code, reason) {
    console.log("关闭连接");
  });
  conn.on("error", function (code, reason) {
    console.log("异常关闭");
  });
}).listen(8000);
